package com.dunshan.rabbitmq.consumer.MessageService;

import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @description: 接受服务
 * @author: 李文
 * @create: 2021-05-09 12:49
 **/
@Log4j2
@Component
@RabbitListener(queues = "TestDirectQueue")
public class DirectReceiverService {
    @RabbitHandler
    public void process(Map testMessage) {

        log.info("DirectReceiverService 消费者收到消息  : {}", testMessage.toString());
    }
}

